The present invention relates to a method for upgrading firmware of an embedded system via a network connection. Further, the present invention relates to an embedded system provided with means for upgrading firmware received over a network, comprising; a volatile memory, a persistent memory, and a protocol stack for communication over a network.
The technology of data communication develops fast and the computer networks are expanding and consist of an increasing number of clients and servers.
Users and owners of networks require that servers and the embedded systems thereof are up to date in accordance with the rapidly changing data communication technology. Further, an increasing part of the development of embedded systems is today performed as development of firmware. Because of the rapid development of data communication technologies and requirements of new functionality from users the firmware of an embedded system has to be upgraded frequently.
Further, the use of computer networks is increasing, and today almost every company has a computer network of their own, or is at least connected to one. The increasing number of computer network results in an increasing number of individuals responsible for the daily maintenance of networks. Many of those individuals are not specialised in computers or computer communications.
Thus, the rapid development of computer communication technologies and products, and the increasing number of individuals responsible for the daily maintenance require that the firmware upgrade of the servers can be performed in a way that is easy and secure, in respect of low error probability.
The upgrading of firmware is today commonly managed by connecting a computer direct to the embedded system. Further it is known to perform upgrading of firmware over the network which the server is connected to.
A significant problem in upgrading the firmware of known embedded systems is that the individual performing the upgrade has to have detailed knowledge of the computer network and the embedded system and have to perform a number of rather complicated steps. Most individuals are not confident in performing said steps and are not confident in using all numerals and characteristics required to be input when performing the firmware upgrade. Further, the upgrading requires a specially designed program within the client to download the firmware upgrade to the embedded system. These aspects makes the operation of upgrading firmware of an embedded system difficult and time consuming for an individual, especially if the individual is not specially skilled in the art of computers and computer communications. In the known art an upgrade file is downloaded to the embedded system by means of a file transfer protocol. The download is performed with a special purpose program and the individual performing the download is required to specify, for example, where, in the form of a network address, the data is to be sent.
Another common problem, when upgrading firmware in embedded systems, is the risk of communication failure during the firmware download. Such failure could render the embedded system inoperative, thus requiring considerate efforts to repair.
U.S. Pat. No. 5,812,857 discloses a method for upgrading a download code set, where an embedded system uses the same network drivers as when in normal operation. Further it describes a download where different portions of the code set are downloaded during different steps of the downloading operation. Some portions of the code set are downloaded to a flash memory via a volatile memory while some portions are downloaded directly to the flash memory. There is also described that a temporary downloader, downloaded during an initial step and replaced by yet another downloader during a later step, is used during the operation of download. The described system and method is designed for minimizing the time of executing code out of volatile memory to the persistent memory and is rather complicated.
The object of the present invention is to provide a new and improved method for upgrading firmware in an embedded system and a new and improved embedded system, in respect of upgrading firmware.
Another object of the invention is to provide a firmware upgrading method that is easy to use and that saves time.
Yet another object of the invention is to provide a firmware upgrading method in which the probability of an erroneous upgrade is minimised.
These objects, as well as other objects that will become apparent from the description below, are accomplished by a method according to claim 1 and 8 and by an embedded system according to claim 19. Preferred embodiments of the invention are disclosed in the dependent claims.
Within the context of the invention the term embedded system denotes a special-purpose computer built into and integral to a server device. Wherein the server device can be, for example, a CD-server, a printer server, a file server, a communication server, etc.
According to the invention, a virtual file system is used in the embedded system. This leads to the advantage that the individual starting the upgrade can be working in a well-known environment and can be able to use the same commands as when handling files within the client computer. Such handling of files within the client system is performed daily by users of computers, thus, the individual is probably familiar with performing such handling and thereby the system according to the invention can be time saving.
Further, by using a virtual file system within an embedded system a simple way of transferring a file from the client computer to the embedded system can be used, e.g. by sharing the virtual file system with the client computer. Sharing a file system shall be interpreted as the file system being arranged in such a way that it can be used within a client computer and be handled as if it was a part of the file system of that client computer.
Yet another advantage of the invention is that the protocol stack of the embedded system can be the same for both the normal operation of the server and the upgrading operation. Thus, it is possible to save space in the persistent memory of the embedded system. It is to be understood that the virtual file system is operating independently of the protocol stack currently in use.
By storing the data of the firmware upgrade file in the volatile memory before writing it to the persistent memory critical data can be checked before it is written to persistent memory. Thus, it is possible to check if the data represents a correct firmware upgrade file and if the data is intended for the product related to the embedded system.
In a preferred embodiment of the invention, the virtual file system of the embedded system is mapped within the client computer. Thereby no specially designed programs have to be used at the client computer. Thus, both time and memory space of the client computer is saved.
According to a specific embodiment of the method of the invention, the entire firmware upgrade file is stored in the volatile memory of the embedded system before it is written to the persistent memory. Thereby an error in the firmware upgrade file can be identified, e.g, by letting control means check the file, before the file replaces the firmware currently stored in the persistent memory. Such errors are generally a result of interruptions in network traffic or other network related errors.